package com.yht.org.mapper;

import com.yht.org.domain.Department;
import com.yht.org.query.DepartmentQuery;

import java.util.List;

public interface DepartmentMapper {
    /**
     * 查询所有
     * @return
     */
    List<Department> selectAll();

    /**
     * 根据id查询
     * @param id
     * @return
     */
    Department selectById(Long id);

    /**
     * 添加一条
     * @param department
     */
    void insert(Department department);

    /**
     * 根据id删除一条
     * @param id
     */
    void delete(Long id);

    /**
     * 修改
     * @param department
     */
    void update(Department department);

    /**
     * 查询总条数
     * @return
     */
    Integer selectCount(DepartmentQuery departmentQuery);

    /**
     * 分页查询
     * @param departmentQuery
     * @return
     */
    List<Department> selectByDepartQuery(DepartmentQuery departmentQuery);

    /**
     * 批量删除
     * @param ids
     */
    void batchDelete(List<Long> ids);
}
